home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gnome-vfs-2.0 / libgnomevfs / gnome-vfs-application-registry.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-01  |  5.2 KB  |  167 lines

  1. /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
  2.  
  3. /* gnome-vfs-application-registry.h
  4.  *
  5.  * Copyright (C) 1998 Miguel de Icaza
  6.  * Copyright (C) 2000 Eazel, Inc
  7.  *
  8.  * The Gnome Library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public License as
  10.  * published by the Free Software Foundation; either version 2 of the
  11.  * License, or (at your option) any later version.
  12.  *
  13.  * The Gnome Library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with the Gnome Library; see the file COPYING.LIB.  If not,
  20.  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.  * Boston, MA 02111-1307, USA. 
  22.  */
  23. /*
  24.  * Authors: George Lebl
  25.  *     Based on original mime-info database code by Miguel de Icaza
  26.  */
  27.  
  28. /* DEPRECATED 
  29.  *
  30.  * Do not use in new code.
  31.  *
  32.  * Use the api in gnome-vfs-mime-handlers.h instead.
  33.  *
  34.  */
  35.  
  36. #ifndef GNOME_VFS_DISABLE_DEPRECATED
  37.  
  38. #ifndef GNOME_VFS_APPLICATION_REGISTRY_H
  39. #define GNOME_VFS_APPLICATION_REGISTRY_H
  40.  
  41. #include <libgnomevfs/gnome-vfs-mime-handlers.h>
  42.  
  43. G_BEGIN_DECLS
  44.     
  45. /**
  46.  * GNOME_VFS_APPLICATION_REGISTRY_COMMAND:
  47.  *
  48.  * Application registry key for fetching the command to execute
  49.  * an application.
  50.  **/
  51. #define GNOME_VFS_APPLICATION_REGISTRY_COMMAND "command"
  52.  
  53. /**
  54.  * GNOME_VFS_APPLICATION_REGISTRY_NAME:
  55.  *
  56.  * Application registry key for fetching the name of an application.
  57.  **/
  58. #define GNOME_VFS_APPLICATION_REGISTRY_NAME "name"
  59.  
  60. /**
  61.  * GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES:
  62.  *
  63.  * Application registry key for determining if an application 
  64.  * can open multiple files in the same invocation.
  65.  **/
  66. #define GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES "can_open_multiple_files"
  67.  
  68. /**
  69.  * GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL:
  70.  *
  71.  * Application registry key for determining if an application
  72.  * needs to run from within a terminal (for example, mpg123)
  73.  **/
  74. #define GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL "requires_terminal"
  75.  
  76. /** 
  77.  * GNOME_VFS_APPLICATION_REGISTRY_USES_GNOMEVFS
  78.  * 
  79.  * Application registry key for determining if an application
  80.  * is using gnome-vfs and thus can open any URI supported by
  81.  * gnome-vfs
  82.  */
  83. #define GNOME_VFS_APPLICATION_REGISTRY_USES_GNOMEVFS "uses_gnomevfs"
  84.  
  85. /**
  86.  * GNOME_VFS_APPLICATION_REGISTRY_STARTUP_NOTIFY:
  87.  *
  88.  * Application registry key for determining if an application
  89.  * supports freedesktop.org-style startup notification.
  90.  **/
  91. #define GNOME_VFS_APPLICATION_REGISTRY_STARTUP_NOTIFY "startup_notify"
  92.     
  93. /*
  94.  * Existance check
  95.  */
  96. gboolean    gnome_vfs_application_registry_exists          (const char *app_id);
  97.  
  98. /*
  99.  * Getting arbitrary keys
  100.  */
  101. GList          *gnome_vfs_application_registry_get_keys          (const char *app_id);
  102. const char     *gnome_vfs_application_registry_peek_value         (const char *app_id,
  103.                                      const char *key);
  104. gboolean    gnome_vfs_application_registry_get_bool_value     (const char *app_id,
  105.                                      const char *key,
  106.                                  gboolean *got_key);
  107.  
  108. /*
  109.  * Setting stuff
  110.  */
  111. void        gnome_vfs_application_registry_remove_application(const char *app_id);
  112. void        gnome_vfs_application_registry_set_value    (const char *app_id,
  113.                                  const char *key,
  114.                                  const char *value);
  115. void        gnome_vfs_application_registry_set_bool_value    (const char *app_id,
  116.                                  const char *key,
  117.                                  gboolean value);
  118. void        gnome_vfs_application_registry_unset_key    (const char *app_id,
  119.                                  const char *key);
  120.  
  121. /*
  122.  * Query functions
  123.  */
  124. GList        *gnome_vfs_application_registry_get_applications(const char *mime_type);
  125. GList        *gnome_vfs_application_registry_get_mime_types    (const char *app_id);
  126.  
  127. gboolean    gnome_vfs_application_registry_supports_mime_type  (const char *app_id,
  128.                                     const char *mime_type);
  129. gboolean        gnome_vfs_application_registry_supports_uri_scheme (const char *app_id,
  130.                                     const char *uri_scheme);
  131. gboolean    gnome_vfs_application_is_user_owned_application     (const GnomeVFSMimeApplication *application);
  132.  
  133. /*
  134.  * Mime type functions
  135.  * Note that mime_type can be a specific (image/png) or generic (image/<star>) type
  136.  */
  137.  
  138. void        gnome_vfs_application_registry_clear_mime_types        (const char *app_id);
  139. void        gnome_vfs_application_registry_add_mime_type        (const char *app_id,
  140.                                       const char *mime_type);
  141. void        gnome_vfs_application_registry_remove_mime_type        (const char *app_id,
  142.                                       const char *mime_type);
  143.  
  144.  
  145. /*
  146.  * Commit function, should be called if ANY stuff changes have been made.
  147.  * Stuff is saved into the user directory.
  148.  */
  149. GnomeVFSResult    gnome_vfs_application_registry_sync        (void);
  150.  
  151. void        gnome_vfs_application_registry_shutdown        (void);
  152. void        gnome_vfs_application_registry_reload        (void);
  153.  
  154. /*
  155.  * Integrating with gnome-vfs-mime-handlers
  156.  */
  157. GnomeVFSMimeApplication *
  158.         gnome_vfs_application_registry_get_mime_application(const char *app_id);
  159. void        gnome_vfs_application_registry_save_mime_application(const GnomeVFSMimeApplication *application);
  160.  
  161.  
  162. G_END_DECLS
  163.  
  164. #endif /* GNOME_VFS_APPLICATION_REGISTRY_H */
  165.  
  166. #endif /* GNOME_VFS_DISABLE_DEPRECATED */
  167.